﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewSysErrorLog.ascx.cs"
    Inherits="controls_admin_ViewSysErrorLog" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Thống kê lỗi</h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div id="divResult" runat="server">
    </div>
    <!-- end box / title -->
    <div class="table">
        <table>
            <thead>
                <tr>
                    <th class="left">
                        Dòng lỗi
                    </th>
                    <th class="left">
                        Nội dung
                    </th>
                    <th class="left">
                        Số lỗi
                    </th>
                    <th class="left">
                        Thủ thục
                    </th>
                    <th>
                        Mức độ
                    </th>
                    <th>
                        Tình trạng
                    </th>
                    <th class="last">
                        Ngày xảy ra
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptSysErrorLog" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#Eval("ERROR_LINE")%>
                            </td>
                            <td>
                                <%#Eval("ERROR_MESSAGE")%>
                            </td>
                            <td>
                                <%#Eval("ERROR_NUMBER")%>
                            </td>
                            <td>
                                <%#Eval("ERROR_PROCEDURE")%>
                            </td>
                            <td>
                                <%#Eval("ERROR_SEVERITY")%>
                            </td>
                            <td>
                                <%#Eval("ERROR_STATE")%>
                            </td>
                            <td class="date last">
                                <%#Eval("ERROR_DATE")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <!-- pagination -->
        <div class="pagination pagination-left">
            <div class="pagerContainer" runat="server" id="pageContainner">
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                      else
                      {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
                  }
                  else
                  {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
              }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
